n = int(input())
well = 0
good = 0
for i in range(n):
    a = int(input())
    if a >= 85:
        good += 1
        well += 1
    elif a >= 60:
        well += 1

print('{:.0f}%'.format(well * 100 / n))
print('{:.0f}%'.format(good * 100 / n))
